home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / AppleScript / TCP-IP ScriptAdd 1.1.2.sit / TCP_IP Scripting Addition 1.1.2 / Examples 1.2 / Text Versions / Run and Get FTP 1.2 (text) < prev    next >
MacBinary  |  1994-09-26  |  8.0 KB  |  [TEXT/ToyS]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Run and Get FTP 1.2 (text)

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Mon Sep 26 00:42:55 1994, modified Mon Sep 26 00:42:55 1994, creator 'ToyS', type ASCII, 6978 bytes "Run and Get FTP 1.2 (text)" , at 0x1bc2 912 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ToyS]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1a 52 75 6e 20 61 6e | 64 20 47 65 74 20 46 54 |..Run an|d Get FT|
|00000010| 50 20 31 2e 32 20 28 74 | 65 78 74 29 00 00 00 00 |P 1.2 (t|ext)....|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 00 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 1b 42 00 | 00 03 90 aa ac 01 cf aa |......B.|........|
|00000060| ac 01 cf 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e0 d4 00 00 |........|........|
|00000080| 28 2a 0d 52 75 6e 20 61 | 6e 64 20 47 65 74 20 46 |(*.Run a|nd Get F|
|00000090| 54 50 0d 76 65 72 73 69 | 6f 6e 20 31 2e 32 0d 43 |TP.versi|on 1.2.C|
|000000a0| 6f 70 79 72 69 67 68 74 | 20 a9 20 31 39 39 34 20 |opyright| . 1994 |
|000000b0| 62 79 20 41 74 75 6c 20 | 42 75 74 74 65 2e 20 41 |by Atul |Butte. A|
|000000c0| 6c 6c 20 52 69 67 68 74 | 73 20 52 65 73 65 72 76 |ll Right|s Reserv|
|000000d0| 65 64 2e 0d 0d 52 75 6e | 20 6d 65 20 74 6f 20 67 |ed...Run| me to g|
|000000e0| 65 74 20 61 6c 6c 20 74 | 68 65 20 66 69 6c 65 73 |et all t|he files|
|000000f0| 20 69 6e 20 61 20 73 70 | 65 63 69 66 69 65 64 20 | in a sp|ecified |
|00000100| 64 69 72 65 63 74 6f 72 | 79 20 6f 6e 20 61 20 55 |director|y on a U|
|00000110| 6e 69 78 20 68 6f 73 74 | 20 28 77 6f 72 6b 73 20 |nix host| (works |
|00000120| 62 65 73 74 20 61 66 74 | 65 72 20 75 73 69 6e 67 |best aft|er using|
|00000130| 20 74 68 65 20 44 72 61 | 67 20 61 6e 64 20 44 72 | the Dra|g and Dr|
|00000140| 6f 70 20 46 54 50 20 73 | 61 6d 70 6c 65 29 2e 0d |op FTP s|ample)..|
|00000150| 0d 41 74 75 6c 20 42 75 | 74 74 65 0d 61 74 75 6c |.Atul Bu|tte.atul|
|00000160| 5f 62 75 74 74 65 40 62 | 72 6f 77 6e 2e 65 64 75 |_butte@b|rown.edu|
|00000170| 0d 2a 29 0d 0d 67 6c 6f | 62 61 6c 20 4c 46 2c 20 |.*)..glo|bal LF, |
|00000180| 43 52 2c 20 43 52 4c 46 | 0d 0d 70 72 6f 70 65 72 |CR, CRLF|..proper|
|00000190| 74 79 20 66 74 70 5f 73 | 65 74 20 3a 20 66 61 6c |ty ftp_s|et : fal|
|000001a0| 73 65 0d 70 72 6f 70 65 | 72 74 79 20 66 74 70 5f |se.prope|rty ftp_|
|000001b0| 68 6f 73 74 20 3a 20 22 | 22 0d 70 72 6f 70 65 72 |host : "|".proper|
|000001c0| 74 79 20 66 74 70 5f 75 | 73 65 72 20 3a 20 22 22 |ty ftp_u|ser : ""|
|000001d0| 0d 70 72 6f 70 65 72 74 | 79 20 66 74 70 5f 64 69 |.propert|y ftp_di|
|000001e0| 72 65 63 74 6f 72 79 20 | 3a 20 22 22 0d 70 72 6f |rectory |: "".pro|
|000001f0| 70 65 72 74 79 20 66 74 | 70 5f 6c 6f 63 61 6c 6e |perty ft|p_localn|
|00000200| 61 6d 65 20 3a 20 22 22 | 0d 70 72 6f 70 65 72 74 |ame : ""|.propert|
|00000210| 79 20 66 74 70 5f 74 72 | 61 6e 73 66 65 72 5f 74 |y ftp_tr|ansfer_t|
|00000220| 79 70 65 20 3a 20 22 22 | 0d 0d 6f 6e 20 72 75 6e |ype : ""|..on run|
|00000230| 0d 09 73 65 74 20 64 69 | 61 6c 6f 67 5f 72 65 73 |..set di|alog_res|
|00000240| 70 6f 6e 73 65 20 74 6f | 20 28 64 69 73 70 6c 61 |ponse to| (displa|
|00000250| 79 20 64 69 61 6c 6f 67 | 20 22 45 6e 74 65 72 20 |y dialog| "Enter |
|00000260| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|00000270| 6d 61 63 68 69 6e 65 20 | 77 68 65 72 65 20 79 6f |machine |where yo|
|00000280| 75 20 77 61 6e 74 20 74 | 6f 20 67 65 74 20 66 69 |u want t|o get fi|
|00000290| 6c 65 73 22 20 64 65 66 | 61 75 6c 74 20 61 6e 73 |les" def|ault ans|
|000002a0| 77 65 72 20 66 74 70 5f | 68 6f 73 74 29 0d 09 69 |wer ftp_|host)..i|
|000002b0| 66 20 28 62 75 74 74 6f | 6e 20 72 65 74 75 72 6e |f (butto|n return|
|000002c0| 65 64 20 6f 66 20 64 69 | 61 6c 6f 67 5f 72 65 73 |ed of di|alog_res|
|000002d0| 70 6f 6e 73 65 20 ad 20 | 22 4f 4b 22 29 20 74 68 |ponse . |"OK") th|
|000002e0| 65 6e 0d 09 09 72 65 74 | 75 72 6e 0d 09 65 6c 73 |en...ret|urn..els|
|000002f0| 65 0d 09 09 73 65 74 20 | 66 74 70 5f 68 6f 73 74 |e...set |ftp_host|
|00000300| 20 74 6f 20 74 65 78 74 | 20 72 65 74 75 72 6e 65 | to text| returne|
|00000310| 64 20 6f 66 20 64 69 61 | 6c 6f 67 5f 72 65 73 70 |d of dia|log_resp|
|00000320| 6f 6e 73 65 0d 09 65 6e | 64 20 69 66 0d 09 0d 09 |onse..en|d if....|
|00000330| 73 65 74 20 64 69 61 6c | 6f 67 5f 72 65 73 70 6f |set dial|og_respo|
|00000340| 6e 73 65 20 74 6f 20 28 | 64 69 73 70 6c 61 79 20 |nse to (|display |
|00000350| 64 69 61 6c 6f 67 20 22 | 45 6e 74 65 72 20 79 6f |dialog "|Enter yo|
|00000360| 75 72 20 75 73 65 72 d0 | 69 64 20 6f 6e 20 22 20 |ur user.|id on " |
|00000370| 26 20 66 74 70 5f 68 6f | 73 74 20 64 65 66 61 75 |& ftp_ho|st defau|
|00000380| 6c 74 20 61 6e 73 77 65 | 72 20 66 74 70 5f 75 73 |lt answe|r ftp_us|
|00000390| 65 72 29 0d 09 69 66 20 | 28 62 75 74 74 6f 6e 20 |er)..if |(button |
|000003a0| 72 65 74 75 72 6e 65 64 | 20 6f 66 20 64 69 61 6c |returned| of dial|
|000003b0| 6f 67 5f 72 65 73 70 6f | 6e 73 65 20 ad 20 22 4f |og_respo|nse . "O|
|000003c0| 4b 22 29 20 74 68 65 6e | 0d 09 09 72 65 74 75 72 |K") then|...retur|
|000003d0| 6e 0d 09 65 6c 73 65 0d | 09 09 73 65 74 20 66 74 |n..else.|..set ft|
|000003e0| 70 5f 75 73 65 72 20 74 | 6f 20 74 65 78 74 20 72 |p_user t|o text r|
|000003f0| 65 74 75 72 6e 65 64 20 | 6f 66 20 64 69 61 6c 6f |eturned |of dialo|
|00000400| 67 5f 72 65 73 70 6f 6e | 73 65 0d 09 65 6e 64 20 |g_respon|se..end |
|00000410| 69 66 0d 09 0d 09 73 65 | 74 20 64 69 61 6c 6f 67 |if....se|t dialog|
|00000420| 5f 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 28 64 69 |_respons|e to (di|
|00000430| 73 70 6c 61 79 20 64 69 | 61 6c 6f 67 20 22 45 6e |splay di|alog "En|
|00000440| 74 65 72 20 74 68 65 20 | 64 69 72 65 63 74 6f 72 |ter the |director|
|00000450| 79 20 6f 66 20 66 69 6c | 65 73 20 74 6f 20 67 65 |y of fil|es to ge|
|00000460| 74 20 6f 6e 20 22 20 26 | 20 66 74 70 5f 68 6f 73 |t on " &| ftp_hos|
|00000470| 74 20 26 20 22 20 74 6f | 20 67 65 74 22 20 64 65 |t & " to| get" de|
|00000480| 66 61 75 6c 74 20 61 6e | 73 77 65 72 20 66 74 70 |fault an|swer ftp|
|00000490| 5f 64 69 72 65 63 74 6f | 72 79 29 0d 09 69 66 20 |_directo|ry)..if |
|000004a0| 28 62 75 74 74 6f 6e 20 | 72 65 74 75 72 6e 65 64 |(button |returned|
|000004b0| 20 6f 66 20 64 69 61 6c | 6f 67 5f 72 65 73 70 6f | of dial|og_respo|
|000004c0| 6e 73 65 20 ad 20 22 4f | 4b 22 29 20 74 68 65 6e |nse . "O|K") then|
|000004d0| 0d 09 09 72 65 74 75 72 | 6e 0d 09 65 6c 73 65 0d |...retur|n..else.|
|000004e0| 09 09 73 65 74 20 66 74 | 70 5f 64 69 72 65 63 74 |..set ft|p_direct|
|000004f0| 6f 72 79 20 74 6f 20 74 | 65 78 74 20 72 65 74 75 |ory to t|ext retu|
|00000500| 72 6e 65 64 20 6f 66 20 | 64 69 61 6c 6f 67 5f 72 |rned of |dialog_r|
|00000510| 65 73 70 6f 6e 73 65 0d | 09 65 6e 64 20 69 66 0d |esponse.|.end if.|
|00000520| 09 0d 09 73 65 74 20 64 | 69 61 6c 6f 67 5f 72 65 |...set d|ialog_re|
|00000530| 73 70 6f 6e 73 65 20 74 | 6f 20 28 64 69 73 70 6c |sponse t|o (displ|
|00000540| 61 79 20 64 69 61 6c 6f | 67 20 22 44 6f 20 79 6f |ay dialo|g "Do yo|
|00000550| 75 20 77 61 6e 74 20 74 | 68 65 73 65 20 64 6f 77 |u want t|hese dow|
|00000560| 6e 6c 6f 61 64 65 64 20 | 61 73 20 28 31 29 20 4d |nloaded |as (1) M|
|00000570| 61 63 42 69 6e 61 72 79 | 20 66 69 6c 65 73 2c 20 |acBinary| files, |
|00000580| 28 32 29 20 74 65 78 74 | 20 66 69 6c 65 73 2c 20 |(2) text| files, |
|00000590| 6f 72 20 28 33 29 20 72 | 61 77 20 64 61 74 61 20 |or (3) r|aw data |
|000005a0| 66 69 6c 65 73 3f 22 20 | 64 65 66 61 75 6c 74 20 |files?" |default |
|000005b0| 61 6e 73 77 65 72 20 22 | 31 22 29 0d 09 69 66 20 |answer "|1")..if |
|000005c0| 28 62 75 74 74 6f 6e 20 | 72 65 74 75 72 6e 65 64 |(button |returned|
|000005d0| 20 6f 66 20 64 69 61 6c | 6f 67 5f 72 65 73 70 6f | of dial|og_respo|
|000005e0| 6e 73 65 20 ad 20 22 4f | 4b 22 29 20 74 68 65 6e |nse . "O|K") then|
|000005f0| 0d 09 09 72 65 74 75 72 | 6e 0d 09 65 6c 73 65 0d |...retur|n..else.|
|00000600| 09 09 73 65 74 20 66 74 | 70 5f 74 72 61 6e 73 66 |..set ft|p_transf|
|00000610| 65 72 5f 74 79 70 65 20 | 74 6f 20 28 28 74 65 78 |er_type |to ((tex|
|00000620| 74 20 72 65 74 75 72 6e | 65 64 20 6f 66 20 64 69 |t return|ed of di|
|00000630| 61 6c 6f 67 5f 72 65 73 | 70 6f 6e 73 65 29 20 61 |alog_res|ponse) a|
|00000640| 73 20 69 6e 74 65 67 65 | 72 29 0d 09 65 6e 64 20 |s intege|r)..end |
|00000650| 69 66 0d 09 0d 09 73 65 | 74 20 66 74 70 5f 6c 6f |if....se|t ftp_lo|
|00000660| 63 61 6c 6e 61 6d 65 20 | 74 6f 20 28 63 68 6f 6f |calname |to (choo|
|00000670| 73 65 20 66 6f 6c 64 65 | 72 20 22 53 65 6c 65 63 |se folde|r "Selec|
|00000680| 74 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 66 6f |t destin|ation fo|
|00000690| 72 20 66 69 6c 65 73 22 | 29 20 61 73 20 73 74 72 |r files"|) as str|
|000006a0| 69 6e 67 0d 09 0d 09 73 | 65 74 20 4c 46 20 74 6f |ing....s|et LF to|
|000006b0| 20 28 41 53 43 49 49 20 | 63 68 61 72 61 63 74 65 | (ASCII |characte|
|000006c0| 72 20 6f 66 20 31 30 29 | 0d 09 73 65 74 20 43 52 |r of 10)|..set CR|
|000006d0| 20 74 6f 20 28 41 53 43 | 49 49 20 63 68 61 72 61 | to (ASC|II chara|
|000006e0| 63 74 65 72 20 6f 66 20 | 31 33 29 0d 09 73 65 74 |cter of |13)..set|
|000006f0| 20 43 52 4c 46 20 74 6f | 20 43 52 20 26 20 4c 46 | CRLF to| CR & LF|
|00000700| 0d 09 73 65 74 20 6f 6c | 64 44 65 6c 69 6d 69 74 |..set ol|dDelimit|
|00000710| 65 72 73 20 74 6f 20 41 | 70 70 6c 65 53 63 72 69 |ers to A|ppleScri|
|00000720| 70 74 27 73 20 74 65 78 | 74 20 69 74 65 6d 20 64 |pt's tex|t item d|
|00000730| 65 6c 69 6d 69 74 65 72 | 73 0d 09 73 65 74 20 41 |elimiter|s..set A|
|00000740| 70 70 6c 65 53 63 72 69 | 70 74 27 73 20 74 65 78 |ppleScri|pt's tex|
|00000750| 74 20 69 74 65 6d 20 64 | 65 6c 69 6d 69 74 65 72 |t item d|elimiter|
|00000760| 73 20 74 6f 20 7b 22 2e | 22 7d 0d 09 73 65 74 20 |s to {".|"}..set |
|00000770| 6c 6f 63 61 6c 41 64 64 | 72 20 74 6f 20 28 74 63 |localAdd|r to (tc|
|00000780| 70 20 6d 79 20 61 64 64 | 72 65 73 73 29 0d 09 73 |p my add|ress)..s|
|00000790| 65 74 20 6c 6f 63 61 6c | 41 64 64 72 4c 69 73 74 |et local|AddrList|
|000007a0| 20 74 6f 20 74 65 78 74 | 20 69 74 65 6d 73 20 6f | to text| items o|
|000007b0| 66 20 6c 6f 63 61 6c 41 | 64 64 72 0d 09 73 65 74 |f localA|ddr..set|
|000007c0| 20 41 70 70 6c 65 53 63 | 72 69 70 74 27 73 20 74 | AppleSc|ript's t|
|000007d0| 65 78 74 20 69 74 65 6d | 20 64 65 6c 69 6d 69 74 |ext item| delimit|
|000007e0| 65 72 73 20 74 6f 20 7b | 22 2c 22 7d 0d 09 73 65 |ers to {|","}..se|
|000007f0| 74 20 6c 6f 63 61 6c 41 | 64 64 72 43 6f 6d 6d 61 |t localA|ddrComma|
|00000800| 53 74 72 69 6e 67 20 74 | 6f 20 6c 6f 63 61 6c 41 |String t|o localA|
|00000810| 64 64 72 4c 69 73 74 20 | 61 73 20 73 74 72 69 6e |ddrList |as strin|
|00000820| 67 0d 09 73 65 74 20 41 | 70 70 6c 65 53 63 72 69 |g..set A|ppleScri|
|00000830| 70 74 27 73 20 74 65 78 | 74 20 69 74 65 6d 20 64 |pt's tex|t item d|
|00000840| 65 6c 69 6d 69 74 65 72 | 73 20 74 6f 20 6f 6c 64 |elimiter|s to old|
|00000850| 44 65 6c 69 6d 69 74 65 | 72 73 0d 09 0d 09 73 65 |Delimite|rs....se|
|00000860| 74 20 64 69 61 6c 6f 67 | 5f 72 65 73 70 6f 6e 73 |t dialog|_respons|
|00000870| 65 20 74 6f 20 28 64 69 | 73 70 6c 61 79 20 64 69 |e to (di|splay di|
|00000880| 61 6c 6f 67 20 22 45 6e | 74 65 72 20 74 68 65 20 |alog "En|ter the |
|00000890| 70 61 73 73 77 6f 72 64 | 20 66 6f 72 20 22 20 26 |password| for " &|
|000008a0| 20 66 74 70 5f 75 73 65 | 72 20 26 20 22 40 22 20 | ftp_use|r & "@" |
|000008b0| 26 20 66 74 70 5f 68 6f | 73 74 20 26 20 72 65 74 |& ftp_ho|st & ret|
|000008c0| 75 72 6e 20 26 20 22 4e | 6f 74 65 3a 20 77 68 61 |urn & "N|ote: wha|
|000008d0| 74 20 79 6f 75 20 74 79 | 70 65 20 69 73 20 76 69 |t you ty|pe is vi|
|000008e0| 73 69 62 6c 65 21 22 20 | 64 65 66 61 75 6c 74 20 |sible!" |default |
|000008f0| 61 6e 73 77 65 72 20 22 | 22 29 0d 09 69 66 20 28 |answer "|")..if (|
|00000900| 62 75 74 74 6f 6e 20 72 | 65 74 75 72 6e 65 64 20 |button r|eturned |
|00000910| 6f 66 20 64 69 61 6c 6f | 67 5f 72 65 73 70 6f 6e |of dialo|g_respon|
|00000920| 73 65 20 ad 20 22 4f 4b | 22 29 20 74 68 65 6e 0d |se . "OK|") then.|
|00000930| 09 09 72 65 74 75 72 6e | 0d 09 65 6c 73 65 0d 09 |..return|..else..|
|00000940| 09 73 65 74 20 66 74 70 | 5f 70 61 73 73 77 6f 72 |.set ftp|_passwor|
|00000950| 64 20 74 6f 20 74 65 78 | 74 20 72 65 74 75 72 6e |d to tex|t return|
|00000960| 65 64 20 6f 66 20 64 69 | 61 6c 6f 67 5f 72 65 73 |ed of di|alog_res|
|00000970| 70 6f 6e 73 65 0d 09 65 | 6e 64 20 69 66 0d 09 0d |ponse..e|nd if...|
|00000980| 09 73 65 74 20 73 73 73 | 20 74 6f 20 28 74 63 70 |.set sss| to (tcp|
|00000990| 20 63 6f 6e 6e 65 63 74 | 20 74 6f 20 68 6f 73 74 | connect| to host|
|000009a0| 20 66 74 70 5f 68 6f 73 | 74 20 70 6f 72 74 20 32 | ftp_hos|t port 2|
|000009b0| 31 29 0d 09 74 72 79 0d | 09 09 72 65 61 64 72 65 |1)..try.|..readre|
|000009c0| 73 70 6f 6e 73 65 28 73 | 73 73 29 0d 09 09 69 66 |sponse(s|ss)...if|
|000009d0| 20 28 66 74 70 5f 75 73 | 65 72 20 ad 20 22 22 29 | (ftp_us|er . "")|
|000009e0| 20 74 68 65 6e 0d 09 09 | 09 74 63 70 20 77 72 69 | then...|.tcp wri|
|000009f0| 74 65 20 73 74 72 65 61 | 6d 20 73 73 73 20 64 61 |te strea|m sss da|
|00000a00| 74 61 20 22 55 53 45 52 | 20 22 20 26 20 66 74 70 |ta "USER| " & ftp|
|00000a10| 5f 75 73 65 72 20 26 20 | 72 65 74 75 72 6e 20 75 |_user & |return u|
|00000a20| 73 69 6e 67 20 49 53 4f | 38 38 35 39 31 0d 09 09 |sing ISO|88591...|
|00000a30| 09 72 65 61 64 72 65 73 | 70 6f 6e 73 65 28 73 73 |.readres|ponse(ss|
|00000a40| 73 29 0d 09 09 65 6e 64 | 20 69 66 0d 09 09 69 66 |s)...end| if...if|
|00000a50| 20 28 66 74 70 5f 70 61 | 73 73 77 6f 72 64 20 ad | (ftp_pa|ssword .|
|00000a60| 20 22 22 29 20 74 68 65 | 6e 0d 09 09 09 74 63 70 | "") the|n....tcp|
|00000a70| 20 77 72 69 74 65 20 73 | 74 72 65 61 6d 20 73 73 | write s|tream ss|
|00000a80| 73 20 64 61 74 61 20 22 | 50 41 53 53 20 22 20 26 |s data "|PASS " &|
|00000a90| 20 66 74 70 5f 70 61 73 | 73 77 6f 72 64 20 26 20 | ftp_pas|sword & |
|00000aa0| 72 65 74 75 72 6e 20 75 | 73 69 6e 67 20 49 53 4f |return u|sing ISO|
|00000ab0| 38 38 35 39 31 0d 09 09 | 09 72 65 61 64 72 65 73 |88591...|.readres|
|00000ac0| 70 6f 6e 73 65 28 73 73 | 73 29 0d 09 09 65 6e 64 |ponse(ss|s)...end|
|00000ad0| 20 69 66 0d 09 09 69 66 | 20 28 66 74 70 5f 64 69 | if...if| (ftp_di|
|00000ae0| 72 65 63 74 6f 72 79 20 | ad 20 22 22 29 20 74 68 |rectory |. "") th|
|00000af0| 65 6e 0d 09 09 09 74 63 | 70 20 77 72 69 74 65 20 |en....tc|p write |
|00000b00| 73 74 72 65 61 6d 20 73 | 73 73 20 64 61 74 61 20 |stream s|ss data |
|00000b10| 22 43 57 44 20 22 20 26 | 20 66 74 70 5f 64 69 72 |"CWD " &| ftp_dir|
|00000b20| 65 63 74 6f 72 79 20 26 | 20 72 65 74 75 72 6e 20 |ectory &| return |
|00000b30| 75 73 69 6e 67 20 49 53 | 4f 38 38 35 39 31 0d 09 |using IS|O88591..|
|00000b40| 09 09 72 65 61 64 72 65 | 73 70 6f 6e 73 65 28 73 |..readre|sponse(s|
|00000b50| 73 73 29 0d 09 09 65 6e | 64 20 69 66 0d 09 09 0d |ss)...en|d if....|
|00000b60| 09 09 73 65 74 20 6e 6c | 73 74 5f 73 74 72 65 61 |..set nl|st_strea|
|00000b70| 6d 20 74 6f 20 28 74 63 | 70 20 77 61 69 74 20 66 |m to (tc|p wait f|
|00000b80| 6f 72 20 63 6f 6e 6e 65 | 63 74 29 0d 09 09 0d 09 |or conne|ct).....|
|00000b90| 09 73 65 74 20 6e 6c 73 | 74 5f 73 74 72 65 61 6d |.set nls|t_stream|
|00000ba0| 5f 73 74 61 74 75 73 20 | 74 6f 20 28 74 63 70 20 |_status |to (tcp |
|00000bb0| 73 74 61 74 75 73 20 73 | 74 72 65 61 6d 20 6e 6c |status s|tream nl|
|00000bc0| 73 74 5f 73 74 72 65 61 | 6d 29 0d 09 09 73 65 74 |st_strea|m)...set|
|00000bd0| 20 6e 6c 73 74 48 69 42 | 79 74 65 20 74 6f 20 72 | nlstHiB|yte to r|
|00000be0| 6f 75 6e 64 20 28 6c 6f | 63 61 6c 20 70 6f 72 74 |ound (lo|cal port|
|00000bf0| 20 6f 66 20 6e 6c 73 74 | 5f 73 74 72 65 61 6d 5f | of nlst|_stream_|
|00000c00| 73 74 61 74 75 73 29 20 | 2f 20 32 35 36 20 72 6f |status) |/ 256 ro|
|00000c10| 75 6e 64 69 6e 67 20 64 | 6f 77 6e 0d 09 09 73 65 |unding d|own...se|
|00000c20| 74 20 6e 6c 73 74 4c 6f | 42 79 74 65 20 74 6f 20 |t nlstLo|Byte to |
|00000c30| 28 6c 6f 63 61 6c 20 70 | 6f 72 74 20 6f 66 20 6e |(local p|ort of n|
|00000c40| 6c 73 74 5f 73 74 72 65 | 61 6d 5f 73 74 61 74 75 |lst_stre|am_statu|
|00000c50| 73 29 20 6d 6f 64 20 32 | 35 36 0d 09 09 0d 09 09 |s) mod 2|56......|
|00000c60| 74 63 70 20 77 72 69 74 | 65 20 73 74 72 65 61 6d |tcp writ|e stream|
|00000c70| 20 73 73 73 20 64 61 74 | 61 20 22 50 4f 52 54 20 | sss dat|a "PORT |
|00000c80| 22 20 26 20 6c 6f 63 61 | 6c 41 64 64 72 43 6f 6d |" & loca|lAddrCom|
|00000c90| 6d 61 53 74 72 69 6e 67 | 20 26 20 22 2c 22 20 26 |maString| & "," &|
|00000ca0| 20 6e 6c 73 74 48 69 42 | 79 74 65 20 26 20 22 2c | nlstHiB|yte & ",|
|00000cb0| 22 20 26 20 6e 6c 73 74 | 4c 6f 42 79 74 65 20 26 |" & nlst|LoByte &|
|00000cc0| 20 72 65 74 75 72 6e 20 | 75 73 69 6e 67 20 49 53 | return |using IS|
|00000cd0| 4f 38 38 35 39 31 0d 09 | 09 72 65 61 64 72 65 73 |O88591..|.readres|
|00000ce0| 70 6f 6e 73 65 28 73 73 | 73 29 0d 09 09 0d 09 09 |ponse(ss|s)......|
|00000cf0| 74 63 70 20 77 72 69 74 | 65 20 73 74 72 65 61 6d |tcp writ|e stream|
|00000d00| 20 73 73 73 20 64 61 74 | 61 20 22 54 59 50 45 20 | sss dat|a "TYPE |
|00000d10| 41 22 20 26 20 72 65 74 | 75 72 6e 20 75 73 69 6e |A" & ret|urn usin|
|00000d20| 67 20 49 53 4f 38 38 35 | 39 31 0d 09 09 72 65 61 |g ISO885|91...rea|
|00000d30| 64 72 65 73 70 6f 6e 73 | 65 28 73 73 73 29 0d 09 |drespons|e(sss)..|
|00000d40| 09 0d 09 09 74 63 70 20 | 77 72 69 74 65 20 73 74 |....tcp |write st|
|00000d50| 72 65 61 6d 20 73 73 73 | 20 64 61 74 61 20 22 4e |ream sss| data "N|
|00000d60| 4c 53 54 22 20 26 20 72 | 65 74 75 72 6e 20 75 73 |LST" & r|eturn us|
|00000d70| 69 6e 67 20 49 53 4f 38 | 38 35 39 31 0d 09 09 72 |ing ISO8|8591...r|
|00000d80| 65 61 64 72 65 73 70 6f | 6e 73 65 28 73 73 73 29 |eadrespo|nse(sss)|
|00000d90| 0d 09 09 0d 09 09 72 65 | 70 65 61 74 20 75 6e 74 |......re|peat unt|
|00000da0| 69 6c 20 28 63 6f 6e 6e | 65 63 74 69 6f 6e 20 73 |il (conn|ection s|
|00000db0| 74 61 74 75 73 20 6f 66 | 20 28 74 63 70 20 73 74 |tatus of| (tcp st|
|00000dc0| 61 74 75 73 20 73 74 72 | 65 61 6d 20 6e 6c 73 74 |atus str|eam nlst|
|00000dd0| 5f 73 74 72 65 61 6d 29 | 20 3d 20 43 6f 6e 6e 65 |_stream)| = Conne|
|00000de0| 63 74 65 64 29 0d 09 09 | 65 6e 64 20 72 65 70 65 |cted)...|end repe|
|00000df0| 61 74 0d 09 09 0d 09 09 | 73 65 74 20 6c 69 73 74 |at......|set list|
|00000e00| 4f 66 46 69 6c 65 73 4f | 6e 48 6f 73 74 20 74 6f |OfFilesO|nHost to|
|00000e10| 20 22 22 0d 09 09 72 65 | 70 65 61 74 20 75 6e 74 | ""...re|peat unt|
|00000e20| 69 6c 20 28 63 6f 6e 6e | 65 63 74 69 6f 6e 20 73 |il (conn|ection s|
|00000e30| 74 61 74 75 73 20 6f 66 | 20 28 74 63 70 20 73 74 |tatus of| (tcp st|
|00000e40| 61 74 75 73 20 73 74 72 | 65 61 6d 20 6e 6c 73 74 |atus str|eam nlst|
|00000e50| 5f 73 74 72 65 61 6d 29 | 20 ad 20 43 6f 6e 6e 65 |_stream)| . Conne|
|00000e60| 63 74 65 64 29 0d 09 09 | 09 73 65 74 20 6c 69 73 |cted)...|.set lis|
|00000e70| 74 4f 66 46 69 6c 65 73 | 4f 6e 48 6f 73 74 20 74 |tOfFiles|OnHost t|
|00000e80| 6f 20 6c 69 73 74 4f 66 | 46 69 6c 65 73 4f 6e 48 |o listOf|FilesOnH|
|00000e90| 6f 73 74 20 26 20 28 74 | 63 70 20 72 65 61 64 20 |ost & (t|cp read |
|00000ea0| 73 74 72 65 61 6d 20 6e | 6c 73 74 5f 73 74 72 65 |stream n|lst_stre|
|00000eb0| 61 6d 29 0d 09 09 65 6e | 64 20 72 65 70 65 61 74 |am)...en|d repeat|
|00000ec0| 0d 09 09 0d 09 09 74 63 | 70 20 63 6c 6f 73 65 20 |......tc|p close |
|00000ed0| 73 74 72 65 61 6d 20 6e | 6c 73 74 5f 73 74 72 65 |stream n|lst_stre|
|00000ee0| 61 6d 0d 09 09 0d 09 09 | 73 65 74 20 6f 6c 64 44 |am......|set oldD|
|00000ef0| 65 6c 69 6d 69 74 65 72 | 73 20 74 6f 20 41 70 70 |elimiter|s to App|
|00000f00| 6c 65 53 63 72 69 70 74 | 27 73 20 74 65 78 74 20 |leScript|'s text |
|00000f10| 69 74 65 6d 20 64 65 6c | 69 6d 69 74 65 72 73 0d |item del|imiters.|
|00000f20| 09 09 73 65 74 20 41 70 | 70 6c 65 53 63 72 69 70 |..set Ap|pleScrip|
|00000f30| 74 27 73 20 74 65 78 74 | 20 69 74 65 6d 20 64 65 |t's text| item de|
|00000f40| 6c 69 6d 69 74 65 72 73 | 20 74 6f 20 7b 41 53 43 |limiters| to {ASC|
|00000f50| 49 49 20 63 68 61 72 61 | 63 74 65 72 20 31 33 7d |II chara|cter 13}|
|00000f60| 0d 09 09 73 65 74 20 6c | 69 73 74 4f 66 46 69 6c |...set l|istOfFil|
|00000f70| 65 73 20 74 6f 20 74 65 | 78 74 20 69 74 65 6d 73 |es to te|xt items|
|00000f80| 20 6f 66 20 6c 69 73 74 | 4f 66 46 69 6c 65 73 4f | of list|OfFilesO|
|00000f90| 6e 48 6f 73 74 0d 09 09 | 73 65 74 20 41 70 70 6c |nHost...|set Appl|
|00000fa0| 65 53 63 72 69 70 74 27 | 73 20 74 65 78 74 20 69 |eScript'|s text i|
|00000fb0| 74 65 6d 20 64 65 6c 69 | 6d 69 74 65 72 73 20 74 |tem deli|miters t|
|00000fc0| 6f 20 22 22 0d 09 09 73 | 65 74 20 6c 69 73 74 4f |o ""...s|et listO|
|00000fd0| 66 46 69 6c 65 73 4f 6e | 48 6f 73 74 20 74 6f 20 |fFilesOn|Host to |
|00000fe0| 6c 69 73 74 4f 66 46 69 | 6c 65 73 20 61 73 20 73 |listOfFi|les as s|
|00000ff0| 74 72 69 6e 67 0d 09 09 | 73 65 74 20 41 70 70 6c |tring...|set Appl|
|00001000| 65 53 63 72 69 70 74 27 | 73 20 74 65 78 74 20 69 |eScript'|s text i|
|00001010| 74 65 6d 20 64 65 6c 69 | 6d 69 74 65 72 73 20 74 |tem deli|miters t|
|00001020| 6f 20 7b 41 53 43 49 49 | 20 63 68 61 72 61 63 74 |o {ASCII| charact|
|00001030| 65 72 20 31 30 7d 0d 09 | 09 73 65 74 20 6c 69 73 |er 10}..|.set lis|
|00001040| 74 4f 66 46 69 6c 65 73 | 20 74 6f 20 74 65 78 74 |tOfFiles| to text|
|00001050| 20 69 74 65 6d 73 20 6f | 66 20 6c 69 73 74 4f 66 | items o|f listOf|
|00001060| 46 69 6c 65 73 4f 6e 48 | 6f 73 74 0d 09 09 73 65 |FilesOnH|ost...se|
|00001070| 74 20 41 70 70 6c 65 53 | 63 72 69 70 74 27 73 20 |t AppleS|cript's |
|00001080| 74 65 78 74 20 69 74 65 | 6d 20 64 65 6c 69 6d 69 |text ite|m delimi|
|00001090| 74 65 72 73 20 74 6f 20 | 6f 6c 64 44 65 6c 69 6d |ters to |oldDelim|
|000010a0| 69 74 65 72 73 0d 09 09 | 0d 09 09 69 66 20 66 74 |iters...|...if ft|
|000010b0| 70 5f 74 72 61 6e 73 66 | 65 72 5f 74 79 70 65 20 |p_transf|er_type |
|000010c0| ad 20 32 20 74 68 65 6e | 0d 09 09 09 74 63 70 20 |. 2 then|....tcp |
|000010d0| 77 72 69 74 65 20 73 74 | 72 65 61 6d 20 73 73 73 |write st|ream sss|
|000010e0| 20 64 61 74 61 20 22 54 | 59 50 45 20 49 22 20 26 | data "T|YPE I" &|
|000010f0| 20 72 65 74 75 72 6e 20 | 75 73 69 6e 67 20 49 53 | return |using IS|
|00001100| 4f 38 38 35 39 31 0d 09 | 09 09 72 65 61 64 72 65 |O88591..|..readre|
|00001110| 73 70 6f 6e 73 65 28 73 | 73 73 29 0d 09 09 65 6c |sponse(s|ss)...el|
|00001120| 73 65 0d 09 09 09 74 63 | 70 20 77 72 69 74 65 20 |se....tc|p write |
|00001130| 73 74 72 65 61 6d 20 73 | 73 73 20 64 61 74 61 20 |stream s|ss data |
|00001140| 22 54 59 50 45 20 41 22 | 20 26 20 72 65 74 75 72 |"TYPE A"| & retur|
|00001150| 6e 20 75 73 69 6e 67 20 | 49 53 4f 38 38 35 39 31 |n using |ISO88591|
|00001160| 0d 09 09 09 72 65 61 64 | 72 65 73 70 6f 6e 73 65 |....read|response|
|00001170| 28 73 73 73 29 0d 09 09 | 65 6e 64 20 69 66 0d 09 |(sss)...|end if..|
|00001180| 09 0d 09 09 72 65 70 65 | 61 74 20 77 69 74 68 20 |....repe|at with |
|00001190| 69 6e 64 65 78 46 69 6c | 65 20 69 6e 20 6c 69 73 |indexFil|e in lis|
|000011a0| 74 4f 66 46 69 6c 65 73 | 0d 09 09 09 73 65 74 20 |tOfFiles|....set |
|000011b0| 69 6e 64 65 78 46 69 6c | 65 20 74 6f 20 63 6f 6e |indexFil|e to con|
|000011c0| 74 65 6e 74 73 20 6f 66 | 20 69 6e 64 65 78 46 69 |tents of| indexFi|
|000011d0| 6c 65 0d 09 09 09 69 66 | 20 69 6e 64 65 78 46 69 |le....if| indexFi|
|000011e0| 6c 65 20 3d 20 22 22 20 | 74 68 65 6e 0d 09 09 09 |le = "" |then....|
|000011f0| 09 65 78 69 74 20 72 65 | 70 65 61 74 0d 09 09 09 |.exit re|peat....|
|00001200| 65 6e 64 20 69 66 0d 09 | 09 09 0d 09 09 09 73 65 |end if..|......se|
|00001210| 74 20 64 61 74 61 5f 73 | 74 72 65 61 6d 20 74 6f |t data_s|tream to|
|00001220| 20 28 74 63 70 20 77 61 | 69 74 20 66 6f 72 20 63 | (tcp wa|it for c|
|00001230| 6f 6e 6e 65 63 74 29 0d | 09 09 09 73 65 74 20 64 |onnect).|...set d|
|00001240| 61 74 61 5f 73 74 72 65 | 61 6d 5f 73 74 61 74 75 |ata_stre|am_statu|
|00001250| 73 20 74 6f 20 28 74 63 | 70 20 73 74 61 74 75 73 |s to (tc|p status|
|00001260| 20 73 74 72 65 61 6d 20 | 64 61 74 61 5f 73 74 72 | stream |data_str|
|00001270| 65 61 6d 29 0d 09 09 09 | 73 65 74 20 70 6f 72 74 |eam)....|set port|
|00001280| 48 69 42 79 74 65 20 74 | 6f 20 72 6f 75 6e 64 20 |HiByte t|o round |
|00001290| 28 6c 6f 63 61 6c 20 70 | 6f 72 74 20 6f 66 20 64 |(local p|ort of d|
|000012a0| 61 74 61 5f 73 74 72 65 | 61 6d 5f 73 74 61 74 75 |ata_stre|am_statu|
|000012b0| 73 29 20 2f 20 32 35 36 | 20 72 6f 75 6e 64 69 6e |s) / 256| roundin|
|000012c0| 67 20 64 6f 77 6e 0d 09 | 09 09 73 65 74 20 70 6f |g down..|..set po|
|000012d0| 72 74 4c 6f 42 79 74 65 | 20 74 6f 20 28 6c 6f 63 |rtLoByte| to (loc|
|000012e0| 61 6c 20 70 6f 72 74 20 | 6f 66 20 64 61 74 61 5f |al port |of data_|
|000012f0| 73 74 72 65 61 6d 5f 73 | 74 61 74 75 73 29 20 6d |stream_s|tatus) m|
|00001300| 6f 64 20 32 35 36 0d 09 | 09 09 0d 09 09 09 74 63 |od 256..|......tc|
|00001310| 70 20 77 72 69 74 65 20 | 73 74 72 65 61 6d 20 73 |p write |stream s|
|00001320| 73 73 20 64 61 74 61 20 | 22 50 4f 52 54 20 22 20 |ss data |"PORT " |
|00001330| 26 20 6c 6f 63 61 6c 41 | 64 64 72 43 6f 6d 6d 61 |& localA|ddrComma|
|00001340| 53 74 72 69 6e 67 20 26 | 20 22 2c 22 20 26 20 70 |String &| "," & p|
|00001350| 6f 72 74 48 69 42 79 74 | 65 20 26 20 22 2c 22 20 |ortHiByt|e & "," |
|00001360| 26 20 70 6f 72 74 4c 6f | 42 79 74 65 20 26 20 72 |& portLo|Byte & r|
|00001370| 65 74 75 72 6e 20 75 73 | 69 6e 67 20 49 53 4f 38 |eturn us|ing ISO8|
|00001380| 38 35 39 31 0d 09 09 09 | 72 65 61 64 72 65 73 70 |8591....|readresp|
|00001390| 6f 6e 73 65 28 73 73 73 | 29 0d 09 09 09 0d 09 09 |onse(sss|).......|
|000013a0| 09 74 63 70 20 77 72 69 | 74 65 20 73 74 72 65 61 |.tcp wri|te strea|
|000013b0| 6d 20 73 73 73 20 64 61 | 74 61 20 22 52 45 54 52 |m sss da|ta "RETR|
|000013c0| 20 22 20 26 20 69 6e 64 | 65 78 46 69 6c 65 20 26 | " & ind|exFile &|
|000013d0| 20 72 65 74 75 72 6e 20 | 26 20 4c 46 20 2d 2d 20 | return |& LF -- |
|000013e0| 75 73 69 6e 67 20 49 53 | 4f 38 38 35 39 31 0d 09 |using IS|O88591..|
|000013f0| 09 09 72 65 61 64 72 65 | 73 70 6f 6e 73 65 28 73 |..readre|sponse(s|
|00001400| 73 73 29 0d 09 09 09 0d | 09 09 09 72 65 70 65 61 |ss).....|...repea|
|00001410| 74 20 75 6e 74 69 6c 20 | 28 63 6f 6e 6e 65 63 74 |t until |(connect|
|00001420| 69 6f 6e 20 73 74 61 74 | 75 73 20 6f 66 20 28 74 |ion stat|us of (t|
|00001430| 63 70 20 73 74 61 74 75 | 73 20 73 74 72 65 61 6d |cp statu|s stream|
|00001440| 20 64 61 74 61 5f 73 74 | 72 65 61 6d 29 20 3d 20 | data_st|ream) = |
|00001450| 43 6f 6e 6e 65 63 74 65 | 64 29 0d 09 09 09 65 6e |Connecte|d)....en|
|00001460| 64 20 72 65 70 65 61 74 | 0d 09 09 09 0d 09 09 09 |d repeat|........|
|00001470| 74 72 79 0d 09 09 09 09 | 73 65 74 20 69 6e 64 65 |try.....|set inde|
|00001480| 78 46 75 6c 6c 46 69 6c | 65 4e 61 6d 65 20 74 6f |xFullFil|eName to|
|00001490| 20 66 74 70 5f 6c 6f 63 | 61 6c 6e 61 6d 65 20 26 | ftp_loc|alname &|
|000014a0| 20 69 6e 64 65 78 46 69 | 6c 65 0d 09 09 09 09 69 | indexFi|le.....i|
|000014b0| 66 20 66 74 70 5f 74 72 | 61 6e 73 66 65 72 5f 74 |f ftp_tr|ansfer_t|
|000014c0| 79 70 65 20 3d 20 31 20 | 74 68 65 6e 0d 09 09 09 |ype = 1 |then....|
|000014d0| 09 09 74 63 70 20 72 65 | 63 65 69 76 65 20 73 74 |..tcp re|ceive st|
|000014e0| 72 65 61 6d 20 64 61 74 | 61 5f 73 74 72 65 61 6d |ream dat|a_stream|
|000014f0| 20 64 65 73 74 69 6e 61 | 74 69 6f 6e 20 66 69 6c | destina|tion fil|
|00001500| 65 20 69 6e 64 65 78 46 | 75 6c 6c 46 69 6c 65 4e |e indexF|ullFileN|
|00001510| 61 6d 65 20 75 73 69 6e | 67 20 4d 61 63 42 69 6e |ame usin|g MacBin|
|00001520| 61 72 79 20 6d 61 78 69 | 6d 75 6d 20 73 65 63 6f |ary maxi|mum seco|
|00001530| 6e 64 73 20 31 30 0d 09 | 09 09 09 65 6c 73 65 20 |nds 10..|...else |
|00001540| 69 66 20 66 74 70 5f 74 | 72 61 6e 73 66 65 72 5f |if ftp_t|ransfer_|
|00001550| 74 79 70 65 20 3d 20 32 | 20 74 68 65 6e 0d 09 09 |type = 2| then...|
|00001560| 09 09 09 74 63 70 20 72 | 65 63 65 69 76 65 20 73 |...tcp r|eceive s|
|00001570| 74 72 65 61 6d 20 64 61 | 74 61 5f 73 74 72 65 61 |tream da|ta_strea|
|00001580| 6d 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 66 69 |m destin|ation fi|
|00001590| 6c 65 20 69 6e 64 65 78 | 46 75 6c 6c 46 69 6c 65 |le index|FullFile|
|000015a0| 4e 61 6d 65 20 75 73 69 | 6e 67 20 49 53 4f 38 38 |Name usi|ng ISO88|
|000015b0| 35 39 31 20 6d 61 78 69 | 6d 75 6d 20 73 65 63 6f |591 maxi|mum seco|
|000015c0| 6e 64 73 20 31 30 0d 09 | 09 09 09 65 6c 73 65 20 |nds 10..|...else |
|000015d0| 69 66 20 66 74 70 5f 74 | 72 61 6e 73 66 65 72 5f |if ftp_t|ransfer_|
|000015e0| 74 79 70 65 20 3d 20 33 | 20 74 68 65 6e 0d 09 09 |type = 3| then...|
|000015f0| 09 09 09 74 63 70 20 72 | 65 63 65 69 76 65 20 73 |...tcp r|eceive s|
|00001600| 74 72 65 61 6d 20 64 61 | 74 61 5f 73 74 72 65 61 |tream da|ta_strea|
|00001610| 6d 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 66 69 |m destin|ation fi|
|00001620| 6c 65 20 69 6e 64 65 78 | 46 75 6c 6c 46 69 6c 65 |le index|FullFile|
|00001630| 4e 61 6d 65 20 75 73 69 | 6e 67 20 52 61 77 20 44 |Name usi|ng Raw D|
|00001640| 61 74 61 20 46 6f 72 6b | 20 6d 61 78 69 6d 75 6d |ata Fork| maximum|
|00001650| 20 73 65 63 6f 6e 64 73 | 20 31 30 0d 09 09 09 09 | seconds| 10.....|
|00001660| 65 6e 64 20 69 66 0d 09 | 09 09 6f 6e 20 65 72 72 |end if..|..on err|
|00001670| 6f 72 20 6d 73 67 20 6e | 75 6d 62 65 72 20 6e 75 |or msg n|umber nu|
|00001680| 6d 20 66 72 6f 6d 20 6f | 62 6a 20 70 61 72 74 69 |m from o|bj parti|
|00001690| 61 6c 20 72 65 73 75 6c | 74 20 70 72 0d 09 09 09 |al resul|t pr....|
|000016a0| 09 74 63 70 20 63 6c 6f | 73 65 20 73 74 72 65 61 |.tcp clo|se strea|
|000016b0| 6d 20 64 61 74 61 5f 73 | 74 72 65 61 6d 0d 09 09 |m data_s|tream...|
|000016c0| 09 09 65 72 72 6f 72 20 | 6d 73 67 20 6e 75 6d 62 |..error |msg numb|
|000016d0| 65 72 20 6e 75 6d 20 66 | 72 6f 6d 20 64 61 74 61 |er num f|rom data|
|000016e0| 5f 73 74 72 65 61 6d 0d | 09 09 09 65 6e 64 20 74 |_stream.|...end t|
|000016f0| 72 79 0d 09 09 09 0d 09 | 09 09 74 63 70 20 63 6c |ry......|..tcp cl|
|00001700| 6f 73 65 20 73 74 72 65 | 61 6d 20 64 61 74 61 5f |ose stre|am data_|
|00001710| 73 74 72 65 61 6d 0d 09 | 09 09 72 65 61 64 72 65 |stream..|..readre|
|00001720| 73 70 6f 6e 73 65 28 73 | 73 73 29 0d 09 09 09 0d |sponse(s|ss).....|
|00001730| 09 09 65 6e 64 20 72 65 | 70 65 61 74 0d 09 09 0d |..end re|peat....|
|00001740| 09 09 74 63 70 20 77 72 | 69 74 65 20 73 74 72 65 |..tcp wr|ite stre|
|00001750| 61 6d 20 73 73 73 20 64 | 61 74 61 20 22 51 55 49 |am sss d|ata "QUI|
|00001760| 54 22 20 26 20 72 65 74 | 75 72 6e 20 75 73 69 6e |T" & ret|urn usin|
|00001770| 67 20 49 53 4f 38 38 35 | 39 31 0d 09 09 72 65 61 |g ISO885|91...rea|
|00001780| 64 72 65 73 70 6f 6e 73 | 65 28 73 73 73 29 0d 09 |drespons|e(sss)..|
|00001790| 09 0d 09 09 74 63 70 20 | 63 6c 6f 73 65 20 73 74 |....tcp |close st|
|000017a0| 72 65 61 6d 20 73 73 73 | 0d 09 09 72 65 74 75 72 |ream sss|...retur|
|000017b0| 6e 0d 09 6f 6e 20 65 72 | 72 6f 72 20 6d 73 67 20 |n..on er|ror msg |
|000017c0| 6e 75 6d 62 65 72 20 6e | 75 6d 20 66 72 6f 6d 20 |number n|um from |
|000017d0| 6f 62 6a 20 70 61 72 74 | 69 61 6c 20 72 65 73 75 |obj part|ial resu|
|000017e0| 6c 74 20 70 72 0d 09 09 | 74 72 79 0d 09 09 09 74 |lt pr...|try....t|
|000017f0| 63 70 20 77 72 69 74 65 | 20 73 74 72 65 61 6d 20 |cp write| stream |
|00001800| 73 73 73 20 64 61 74 61 | 20 22 51 55 49 54 22 20 |sss data| "QUIT" |
|00001810| 26 20 72 65 74 75 72 6e | 20 75 73 69 6e 67 20 49 |& return| using I|
|00001820| 53 4f 38 38 35 39 31 0d | 09 09 09 72 65 61 64 72 |SO88591.|...readr|
|00001830| 65 73 70 6f 6e 73 65 28 | 73 73 73 29 0d 09 09 6f |esponse(|sss)...o|
|00001840| 6e 20 65 72 72 6f 72 0d | 09 09 65 6e 64 20 74 72 |n error.|..end tr|
|00001850| 79 0d 09 09 0d 09 09 74 | 63 70 20 63 6c 6f 73 65 |y......t|cp close|
|00001860| 20 73 74 72 65 61 6d 20 | 73 73 73 0d 09 09 65 72 | stream |sss...er|
|00001870| 72 6f 72 20 6d 73 67 20 | 6e 75 6d 62 65 72 20 6e |ror msg |number n|
|00001880| 75 6d 20 66 72 6f 6d 20 | 6f 62 6a 20 70 61 72 74 |um from |obj part|
|00001890| 69 61 6c 20 72 65 73 75 | 6c 74 20 70 72 0d 09 65 |ial resu|lt pr..e|
|000018a0| 6e 64 20 74 72 79 0d 65 | 6e 64 20 72 75 6e 0d 0d |nd try.e|nd run..|
|000018b0| 6f 6e 20 72 65 61 64 72 | 65 73 70 6f 6e 73 65 28 |on readr|esponse(|
|000018c0| 73 73 74 72 65 61 6d 29 | 0d 09 73 65 74 20 63 6f |sstream)|..set co|
|000018d0| 6e 74 69 6e 75 65 63 68 | 61 72 20 74 6f 20 22 22 |ntinuech|ar to ""|
|000018e0| 0d 09 73 65 74 20 77 68 | 6f 6c 65 6d 65 73 73 61 |..set wh|olemessa|
|000018f0| 67 65 20 74 6f 20 22 22 | 0d 09 72 65 70 65 61 74 |ge to ""|..repeat|
|00001900| 20 75 6e 74 69 6c 20 63 | 6f 6e 74 69 6e 75 65 63 | until c|ontinuec|
|00001910| 68 61 72 20 3d 20 22 20 | 22 0d 09 09 72 65 70 65 |har = " |"...repe|
|00001920| 61 74 20 75 6e 74 69 6c | 20 28 74 63 70 20 61 68 |at until| (tcp ah|
|00001930| 65 61 64 20 63 68 61 72 | 61 63 74 65 72 73 20 4c |ead char|acters L|
|00001940| 46 20 73 74 72 65 61 6d | 20 73 73 74 72 65 61 6d |F stream| sstream|
|00001950| 29 0d 09 09 65 6e 64 20 | 72 65 70 65 61 74 0d 09 |)...end |repeat..|
|00001960| 09 73 65 74 20 72 65 61 | 64 6c 69 6e 65 20 74 6f |.set rea|dline to|
|00001970| 20 28 74 63 70 20 72 65 | 61 64 20 73 74 72 65 61 | (tcp re|ad strea|
|00001980| 6d 20 73 73 74 72 65 61 | 6d 20 75 6e 74 69 6c 20 |m sstrea|m until |
|00001990| 63 68 61 72 61 63 74 65 | 72 73 20 4c 46 20 75 73 |characte|rs LF us|
|000019a0| 69 6e 67 20 49 53 4f 38 | 38 35 39 31 29 0d 09 09 |ing ISO8|8591)...|
|000019b0| 73 65 74 20 73 63 61 6e | 20 74 6f 20 28 73 63 61 |set scan| to (sca|
|000019c0| 6e 6c 69 6e 65 28 72 65 | 61 64 6c 69 6e 65 29 29 |nline(re|adline))|
|000019d0| 0d 09 09 73 65 74 20 63 | 6f 6e 74 69 6e 75 65 63 |...set c|ontinuec|
|000019e0| 68 61 72 20 74 6f 20 69 | 74 65 6d 20 32 20 6f 66 |har to i|tem 2 of|
|000019f0| 20 73 63 61 6e 0d 09 09 | 73 65 74 20 77 68 6f 6c | scan...|set whol|
|00001a00| 65 6d 65 73 73 61 67 65 | 20 74 6f 20 77 68 6f 6c |emessage| to whol|
|00001a10| 65 6d 65 73 73 61 67 65 | 20 26 20 22 20 22 20 26 |emessage| & " " &|
|00001a20| 20 69 74 65 6d 20 33 20 | 6f 66 20 73 63 61 6e 0d | item 3 |of scan.|
|00001a30| 09 65 6e 64 20 72 65 70 | 65 61 74 0d 09 73 65 74 |.end rep|eat..set|
|00001a40| 20 65 72 72 6f 72 43 6f | 64 65 20 74 6f 20 69 74 | errorCo|de to it|
|00001a50| 65 6d 20 31 20 6f 66 20 | 73 63 61 6e 20 61 73 20 |em 1 of |scan as |
|00001a60| 69 6e 74 65 67 65 72 0d | 09 69 66 20 28 65 72 72 |integer.|.if (err|
|00001a70| 6f 72 43 6f 64 65 20 b3 | 20 34 30 30 29 20 74 68 |orCode .| 400) th|
|00001a80| 65 6e 0d 09 09 64 69 73 | 70 6c 61 79 20 64 69 61 |en...dis|play dia|
|00001a90| 6c 6f 67 20 22 45 72 72 | 6f 72 3a 20 22 20 26 20 |log "Err|or: " & |
|00001aa0| 77 68 6f 6c 65 6d 65 73 | 73 61 67 65 0d 09 09 65 |wholemes|sage...e|
|00001ab0| 72 72 6f 72 20 77 68 6f | 6c 65 6d 65 73 73 61 67 |rror who|lemessag|
|00001ac0| 65 20 6e 75 6d 62 65 72 | 20 65 72 72 6f 72 43 6f |e number| errorCo|
|00001ad0| 64 65 0d 09 65 6e 64 20 | 69 66 0d 65 6e 64 20 72 |de..end |if.end r|
|00001ae0| 65 61 64 72 65 73 70 6f | 6e 73 65 0d 0d 2d 2d 20 |eadrespo|nse..-- |
|00001af0| 4d 61 74 63 68 65 73 20 | 6c 69 6e 65 73 20 6c 69 |Matches |lines li|
|00001b00| 6b 65 3a 0d 2d 2d 20 32 | 35 30 20 74 65 73 74 2e |ke:.-- 2|50 test.|
|00001b10| 2e 2e 20 53 65 6e 64 65 | 72 20 6f 6b 0d 0d 6f 6e |.. Sende|r ok..on|
|00001b20| 20 73 63 61 6e 6c 69 6e | 65 28 6c 6c 69 6e 65 29 | scanlin|e(lline)|
|00001b30| 0d 09 72 65 74 75 72 6e | 20 7b 63 68 61 72 61 63 |..return| {charac|
|00001b40| 74 65 72 73 20 31 20 74 | 68 72 6f 75 67 68 20 33 |ters 1 t|hrough 3|
|00001b50| 20 6f 66 20 6c 6c 69 6e | 65 20 61 73 20 73 74 72 | of llin|e as str|
|00001b60| 69 6e 67 2c 20 63 68 61 | 72 61 63 74 65 72 20 34 |ing, cha|racter 4|
|00001b70| 20 6f 66 20 6c 6c 69 6e | 65 20 61 73 20 73 74 72 | of llin|e as str|
|00001b80| 69 6e 67 2c 20 c2 0d 09 | 09 63 68 61 72 61 63 74 |ing, ...|.charact|
|00001b90| 65 72 73 20 35 20 74 68 | 72 6f 75 67 68 20 65 6e |ers 5 th|rough en|
|00001ba0| 64 20 6f 66 20 6c 6c 69 | 6e 65 20 61 73 20 73 74 |d of lli|ne as st|
|00001bb0| 72 69 6e 67 7d 0d 65 6e | 64 20 73 63 61 6e 6c 69 |ring}.en|d scanli|
|00001bc0| 6e 65 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ne......|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 00 00 01 00 00 00 02 ee | 00 00 01 ee 00 00 00 a2 |........|........|
|00001c10| 00 00 76 8d 00 75 03 00 | 00 00 00 00 00 00 00 00 |..v..u..|........|
|00001c20| 00 00 56 4e 0c 45 78 61 | 6d 70 6c 65 73 20 31 2e |..VN.Exa|mples 1.|
|00001c30| 1a 52 75 6e 20 61 6e 64 | 20 47 65 74 20 46 54 50 |.Run and| Get FTP|
|00001c40| 20 31 2e 32 20 28 74 65 | 78 74 29 46 02 00 00 00 | 1.2 (te|xt)F....|
|00001c50| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00001c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c70| 00 00 aa e5 26 cd 00 00 | 00 00 00 00 03 90 00 00 |....&...|........|
|00001c80| 62 00 aa 6c 39 a7 aa a1 | eb 56 00 00 00 00 00 00 |b..l9...|.V......|
|00001c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 56 4e 00 00 |........|....VN..|
|00001ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 ad fc 00 07 |........|........|
|00001cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 1a 00 00 00 |........|........|
|00001cc0| 76 8d 14 46 61 63 65 53 | 70 61 6e 20 46 54 50 20 |v..FaceS|pan FTP |
|00001cd0| 43 6c 69 65 6e 74 73 73 | 01 00 00 00 00 02 00 00 |Clientss|........|
|00001ce0| 77 b7 aa a1 d1 20 aa ab | 20 0b 00 00 00 00 01 3d |w.... ..| ......=|
|00001cf0| 00 15 01 ce 01 37 01 00 | 00 00 00 00 01 40 ff f8 |.....7..|.....@..|
|00001d00| 00 00 00 78 00 00 00 00 | 00 08 00 00 00 00 00 00 |...x....|........|
|00001d10| 00 00 00 00 00 00 00 00 | ff ff ff ff 00 00 00 34 |........|.......4|
|00001d20| 00 00 00 24 00 00 00 00 | 20 6f 00 04 a0 5f 20 6f |...$....| o..._ o|
|00001d30| 00 04 a1 28 a0 23 4e 75 | 43 54 6f 20 72 75 6e 20 |...(.#Nu|CTo run |
|00001d40| 74 68 69 73 20 73 63 72 | 69 70 74 20 61 70 70 6c |this scr|ipt appl|
|00001d50| 69 63 61 74 69 6f 6e 2c | 20 79 6f 75 20 6d 75 73 |ication,| you mus|
|00001d60| 74 20 66 69 72 73 74 20 | 69 6e 73 74 61 6c 6c 20 |t first |install |
|00001d70| 41 70 70 6c 65 53 63 72 | 69 70 74 2e 00 00 00 1a |AppleScr|ipt.....|
|00001d80| 40 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |@.......|........|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 0a 58 e0 |........|......X.|
|00001da0| 00 07 d0 00 00 03 20 00 | 00 00 00 0a 58 e0 00 07 |...... .|....X...|
|00001db0| d0 00 00 03 20 00 00 00 | 00 ee 52 75 6e 20 61 6e |.... ...|..Run an|
|00001dc0| 64 20 47 65 74 20 46 54 | 50 0d 76 65 72 73 69 6f |d Get FT|P.versio|
|00001dd0| 6e 20 31 2e 32 0d 43 6f | 70 79 72 69 67 68 74 20 |n 1.2.Co|pyright |
|00001de0| a9 20 31 39 39 34 20 62 | 79 20 41 74 75 6c 20 42 |. 1994 b|y Atul B|
|00001df0| 75 74 74 65 2e 20 41 6c | 6c 20 52 69 67 68 74 73 |utte. Al|l Rights|
|00001e00| 20 52 65 73 65 72 76 65 | 64 2e 0d 0d 52 75 6e 20 | Reserve|d...Run |
|00001e10| 6d 65 20 74 6f 20 67 65 | 74 20 61 6c 6c 20 74 68 |me to ge|t all th|
|00001e20| 65 20 66 69 6c 65 73 20 | 69 6e 20 61 20 73 70 65 |e files |in a spe|
|00001e30| 63 69 66 69 65 64 20 64 | 69 72 65 63 74 6f 72 79 |cified d|irectory|
|00001e40| 20 6f 6e 20 61 20 55 6e | 69 78 20 68 6f 73 74 20 | on a Un|ix host |
|00001e50| 28 77 6f 72 6b 73 20 62 | 65 73 74 20 61 66 74 65 |(works b|est afte|
|00001e60| 72 20 75 73 69 6e 67 20 | 74 68 65 20 44 72 61 67 |r using |the Drag|
|00001e70| 20 61 6e 64 20 44 72 6f | 70 20 46 54 50 20 73 61 | and Dro|p FTP sa|
|00001e80| 6d 70 6c 65 29 2e 0d 0d | 41 74 75 6c 20 42 75 74 |mple)...|Atul But|
|00001e90| 74 65 0d 61 74 75 6c 5f | 62 75 74 74 65 40 62 72 |te.atul_|butte@br|
|00001ea0| 6f 77 6e 2e 65 64 75 0d | 00 00 00 2a 00 02 00 00 |own.edu.|...*....|
|00001eb0| 00 00 00 0c 00 0a 00 02 | 01 00 00 09 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 0f 00 0c | 00 0a 00 02 00 00 00 09 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 14 00 28 00 02 01 91 |........|...(....|
|00001ee0| 01 9f 00 28 00 02 01 dd | 02 5d 00 00 00 00 00 00 |...(....|.]......|
|00001ef0| 01 00 00 00 02 ee 00 00 | 01 ee 00 00 00 a2 00 5a |........|.......Z|
|00001f00| ca a8 0f cc 00 00 00 1c | 00 a2 00 05 4e 4f 54 49 |........|....NOTI|
|00001f10| 00 00 00 32 73 63 73 7a | 00 00 00 3e 53 49 5a 45 |...2scsz|...>SIZE|
|00001f20| 00 01 00 4a 54 45 58 54 | 00 00 00 62 73 74 79 6c |...JTEXT|...bstyl|
|00001f30| 00 00 00 6e 57 50 6f 73 | 00 00 00 7a 00 80 ff ff |...nWPos|...z....|
|00001f40| 50 00 00 00 00 5a d5 d8 | 00 00 ff ff 00 00 00 7c |P....Z..|.......||
|00001f50| 00 5a d5 e0 00 00 ff ff | 00 00 00 9a 00 5a d5 f0 |.Z......|.....Z..|
|00001f60| 00 01 ff ff 00 00 00 a8 | 00 5a d5 e4 04 68 ff ff |........|.Z...h..|
|00001f70| 00 00 00 b6 00 5a d5 d4 | 04 68 ff ff 00 00 01 a8 |.....Z..|.h......|
|00001f80| 00 5a d5 d0 00 80 ff ff | 00 00 01 d6 00 5a d5 dc |.Z......|.....Z..|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+